Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBIO: Enable reassignment of ownership of records #19

Open
wants to merge 15 commits into
base: integration
Choose a base branch
from

Conversation

RayPlante
Copy link
Collaborator

@RayPlante RayPlante commented Nov 19, 2024

The aim of this PR is to allow changing the owner of a DBIO record through the web API. To validate the new user ID as valid and recognized, access to the people service is made available to the dbio.DBClient. This is done via the PeopleService which has a direct connection to the MongoDB collections (rather than through a web API). The mds3 DAP service was updated to use this same PeopleService instance (switching from the NSDClient which goes through the web API). To make use of the people service, the dbio configuration must include a people_service parameter.

When the ownership is changed to a new user, the service will also update the ACLs to give all permissions to the new user. The permissions for the old user are not removed.

As a convenience, the API was updated to allow clients to request and update the record's name and owner using a plain text (by setting the Content-Type header to text/plain) instead of the default JSON format.

To test, it is recommended to run under oar-docker, MIDASbeta branch, setting the tag for dbio to this branch in the deployment.yml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant